from multiprocessing import Process
from time import sleep


def task1():
    while True:
        sleep(1)
        print('这是任务1...')


def task2():
    while True:
        sleep(1)
        print('这是任务2...')


if __name__ == '__main__':
    p1 = Process(target=task1)
    p2 = Process(target=task2)

    p1.start()
    p2.start()
